import { NoSkinCellRenderer } from "../../../common/item/NoSkinCellRenderer";
import { Cache } from "../../../../cache/Cache";
import { ObjCreate } from "../../../common/ObjCreate";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
type int = number;
//class KingChampionShipResultTabRender1
    
    export  class KingChampionShipResultTabRender1 extends NoSkinCellRenderer
    {
        constructor()
        {
            super();
            this.initView();
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            this._txtRank.text = arg1["rank"];
            this._txtGuildName.text = arg1["guildName"];
            this._txtScore.text = arg1["score"];
            this._txtJob.text = arg1["job"];
            if (!(Cache.instance.guild.guildInfo == null) && arg1["guildName"] == Cache.instance.guild.guildInfo.guildName) 
            {
                this._txtRank.textColor = 65280;
                this._txtGuildName.textColor = 65280;
                this._txtScore.textColor = 65280;
                this._txtJob.textColor = 65280;
            }
            return;
        }

        /* internal  */initView(): void
        {
            this._txtRank = this.createText(0, 10, 83, 20);
            this._txtGuildName = this.createText(101, 10, 104, 20);
            this._txtScore = this.createText(220, 10, 64, 20);
            this._txtJob = this.createText(292, 10, 130, 20);
            ObjCreate.createBg(5, 34, 408, 1, this, ImagesConst.SplitLine);
            return;
        }

        /* internal  */createText(arg1: int, arg2: int, arg3: int, arg4: int): GTextFiled
        {
            var loc1=null;
            var loc2;
            (loc2 = (loc1 = ObjCreate.createGTextField("", arg1, arg2, arg3, arg4, this)).defaultTextFormat).align = flash.text.TextFormatAlign.CENTER;
            loc1.defaultTextFormat = loc2;
            return loc1;
        }

        /* internal */ /* var */_txtRank: GTextFiled;

        /* internal */ /* var */_txtGuildName: GTextFiled;

        /* internal */ /* var */_txtScore: GTextFiled;

        /* internal */ /* var */_txtJob: GTextFiled;
    }
